package edu.pku.sei.gefcommon.descriptor.descriptors;

import org.eclipse.ui.views.properties.TextPropertyDescriptor;

public class IntegerPropertyDescriptor extends TextPropertyDescriptor {

	public IntegerPropertyDescriptor(Object id, String name,String catalog) {
		super(id, name);
		this.setCategory(catalog);
		this.setValidator(NumberValidator.integerValidator);
	}
	
	static public String fromModel(Integer value){
		return String.valueOf(value);
	}
	static public Integer toModel(String value){
		return Integer.parseInt(value);
	}
}
